namespace EyeOpen.Web.Mvc
{
	using System;
	using System.Linq.Expressions;

	public static class TypeExtensions
	{
		public static string GetMethodName<TType>(Expression<Action<TType>> action)
		{
			var methodCallExpression = (MethodCallExpression)action.Body;

			return 
				methodCallExpression.Method.Name;
		}
	}
}